<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app"></div>

    <script src="../Vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {
          list: [],
        },
        mounted() {
          // fetch是h5自带的用于做数据请求
          // 会直接返回promise
          fetch("http://www.pudge.wang:3080/api/rated/list")
            .then((response) => response.json())
            .then((res) => {
              // console.log(res);
              this.list = res.result;
            });
        },
      });
    </script>
  </body>
</html>
